#pragma once
#include <ntsecapi.h>
#define SECURITY_WIN32
#include <Sspi.h>
#include <Ntsecpkg.h>
#include <stdlib.h>
#include <stdio.h>
#include <Sddl.h>
#include <Aclapi.h>

typedef NTSTATUS (__stdcall *LsaApLogonUserEx2Type) (
    PLSA_CLIENT_REQUEST ClientRequest,
    SECURITY_LOGON_TYPE LogonType,
    PVOID ProtocolSubmitBuffer,
    PVOID ClientBufferBase,
    ULONG SubmitBufferSize,
    PVOID* ProfileBuffer,
    PULONG ProfileBufferSize,
    PLUID LogonId,
    PNTSTATUS SubStatus,
    PLSA_TOKEN_INFORMATION_TYPE TokenInformationType,
    PVOID* TokenInformation,
    PUNICODE_STRING* AccountName,
    PUNICODE_STRING* AuthenticatingAuthority,
    PUNICODE_STRING* MachineName,
    PSECPKG_PRIMARY_CRED PrimaryCredentials,
    PSECPKG_SUPPLEMENTAL_CRED_ARRAY* SupplementalCredentials
    );

struct shared_struct 
{
    bool init;
    wchar_t filename[MAX_PATH+1];
    wchar_t name[256];
    int mode;
    char p_id[SECURITY_MAX_SID_SIZE];
    int do_resident ;
};


